var sType = "";
var Game1 = new Array();
var Game2 = new Array();
var Game3 = new Array();
var Game4 = new Array();
var Game5 = new Array();
var Game6 = new Array();
var Game7 = new Array();
var Game8 = new Array();
var Game9 = new Array();
var Game10 = new Array();
var Game11 = new Array();
var Game12 = new Array();
var Game13 = new Array();
var Game14 = new Array();
var Game15 = new Array();
var Game16 = new Array();
var Game18 = new Array();
var Game19 = new Array();
var Game20 = new Array();
var Game21 = new Array();
var Game22 = new Array();
var Game23 = new Array();
var Game24 = new Array();
var Game25 = new Array();
var Game26 = new Array();
var Game28 = new Array();
var Game51 = new Array();
var Game52 = new Array();
var Game53 = new Array();
var Game54 = new Array();
var Game55 = new Array();
var Game56 = new Array();
var Game57 = new Array();
var Game58 = new Array();
var Game59 = new Array();
var Game60 = new Array();
var Game61 = new Array();
var Game62 = new Array();
var Game63 = new Array();
var Game64 = new Array();
var Game65 = new Array();
var Game66 = new Array();
var Game67 = new Array();
var Game84 = new Array();
var Game85 = new Array();
var Game86 = new Array();
var Game92 = new Array();
var Game93 = new Array();
var arrEveLimitUsed = new Array();
var UseCredit = 0;
var strGameTime = "";
var strEndGameTime = "";
var strChinaTime = "";
var strGameNo = "";
var strLottoNum = "";
var strCheckKey1 = "";
var strCheckKey2 = "";
var strMarquee = "";
var strDisplay = "none";
var arrImages = new Array("00", "00", "00", "00", "00", "00", "00");
var objMFrame;
var objLFrame;

window.onload = (function(){
	objMFrame = (document.all)?document.frames.mainFrame:document.getElementById("mainFrameID").contentWindow;
	objLFrame = (document.all)?document.frames.leftFrame:document.getElementById("leftFrameID").contentWindow;
});

function ShowScore(){
	objMFrame = (document.all)?document.frames.mainFrame:document.getElementById("mainFrameID").contentWindow;
	with(objMFrame){
		DisplayWindow();
	}
}

function ClearCModule(){
	objMFrame = (document.all)?document.frames.mainFrame:document.getElementById("mainFrameID").contentWindow;
	with(objMFrame){
		if(null != chkMinStake && chkMinStake.length > 0){
			clearTextField();
		}else if(null != chkMinStake && chkMinStake != ""){
			clearTextField();
		}
	}
}

function ShowNumberOdds_C(isSpecial){
	switch(sType){
		case "o":
			return ShowNumberOdds_O(isSpecial);
			break;
		case "q":
			return ShowNumberOdds_Q(isSpecial);
			break;
	}
	var i = 1, arrTmpGame = new Array(), arrOEGame = new Array(), arrOUGame = new Array(), arrSOEGame = new Array();
	arrTmpGame = eval("Game" + isSpecial);

	objMFrame = (document.all)?document.frames.mainFrame:document.getElementById("mainFrameID").contentWindow;
	with(objMFrame){
		//document.all.Marquees.innerHTML = strMarquee;
		intUseCredit = UseCredit;
		arrChildEveLimitUsed = arrEveLimitUsed;
		document.CommonWagerForm.CheckKey1.value = strCheckKey1;
		document.CommonWagerForm.CheckKey2.value = strCheckKey2;
		document.CommonWagerForm.UserID.value = strUserID;
		if(isSpecial == 1 || isSpecial == 28){
			arrOEGame = Game2;
			arrOUGame = Game3;
			arrSOEGame = Game16;
		}else if(isSpecial == 4){
			arrOEGame = Game5;
			arrOUGame = Game6;
		}
		GetWagerTable();
		document.CommonWagerForm.GambleID.value = arrTmpGame[1][1];
		document.CommonWagerForm.LottoID.value = arrTmpGame[1][0];
		//document.getElementById("GameTime").innerHTML = strGameTime;
		document.getElementById("GameNo").innerHTML = strGameNo;
		document.getElementById("ChinaTime").innerHTML = strChinaTime;
		if(isSpecial > 20 && isSpecial < 27)return;
		//單雙
		//document.ShowOddsForm["Odds2_0"].value = "";
		//document.ShowOddsForm["Odds2_1"].value = "";
		document.getElementById("OddsTD2_0").innerHTML = Math.round((1 + parseFloat(arrOEGame[0][5]))*1000)/1000;
		document.getElementById("OddsTD2_1").innerHTML = Math.round((1 + parseFloat(arrOEGame[1][5]))*1000)/1000;
		if(arrOEGame[0][6] == "1"){
			document.ShowOddsForm["Odds2_0"].disabled = true;
			document.ShowOddsForm["Odds2_1"].disabled = true;
			document.getElementById("OddsTD2_0").className = "mbline_ratio_stop";
			document.getElementById("OddsTP2_0").className = "mbline_stop";
			document.getElementById("OddsTD2_1").className = "mbline_ratio_stop";
			document.getElementById("OddsTP2_1").className = "mbline_stop";
		}else{
			document.ShowOddsForm["Odds2_0"].disabled = false;
			document.ShowOddsForm["Odds2_1"].disabled = false;
			document.getElementById("OddsTD2_0").className = "mbline_ratio";
			document.getElementById("OddsTP2_0").className = "mbline";
			document.getElementById("OddsTD2_1").className = "mbline_ratio";
			document.getElementById("OddsTP2_1").className = "mbline";
		}
		//大小
		//document.ShowOddsForm["Odds3_0"].value = "";
		//document.ShowOddsForm["Odds3_1"].value = "";
		document.getElementById("OddsTD3_0").innerHTML = Math.round((1 + parseFloat(arrOUGame[0][5]))*1000)/1000;
		document.getElementById("OddsTD3_1").innerHTML = Math.round((1 + parseFloat(arrOUGame[1][5]))*1000)/1000;
		if(arrOUGame[0][6] == "1"){
			document.ShowOddsForm["Odds3_0"].disabled = true;
			document.ShowOddsForm["Odds3_1"].disabled = true;
			document.getElementById("OddsTD3_0").className = "mbline_ratio_stop";
			document.getElementById("OddsTP3_0").className = "mbline_stop";
			document.getElementById("OddsTD3_1").className = "mbline_ratio_stop";
			document.getElementById("OddsTP3_1").className = "mbline_stop";
		}else{
			document.ShowOddsForm["Odds3_0"].disabled = false;
			document.ShowOddsForm["Odds3_1"].disabled = false;
			document.getElementById("OddsTD3_0").className = "mbline_ratio";
			document.getElementById("OddsTP3_0").className = "mbline";
			document.getElementById("OddsTD3_1").className = "mbline_ratio";
			document.getElementById("OddsTP3_1").className = "mbline";
		}
		if(isSpecial == 1 || isSpecial == 28){
			//合數單雙
			//document.ShowOddsForm["Odds16_0"].value = "";
			//document.ShowOddsForm["Odds16_1"].value = "";
			document.getElementById("OddsTD16_0").innerHTML = Math.round((1 + parseFloat(arrSOEGame[0][5]))*1000)/1000;
			document.getElementById("OddsTD16_1").innerHTML = Math.round((1 + parseFloat(arrSOEGame[1][5]))*1000)/1000;
			if(arrSOEGame[0][6] == "1"){
				document.ShowOddsForm["Odds16_0"].disabled = true;
				document.ShowOddsForm["Odds16_1"].disabled = true;
				document.getElementById("OddsTD16_0").className = "mbline_ratio_stop";
				document.getElementById("OddsTP16_0").className = "mbline_stop";
				document.getElementById("OddsTD16_1").className = "mbline_ratio_stop";
				document.getElementById("OddsTP16_1").className = "mbline_stop";
			}else{
				document.ShowOddsForm["Odds16_0"].disabled = false;
				document.ShowOddsForm["Odds16_1"].disabled = false;
				document.getElementById("OddsTD16_0").className = "mbline_ratio";
				document.getElementById("OddsTP16_0").className = "mbline";
				document.getElementById("OddsTD16_1").className = "mbline_ratio";
				document.getElementById("OddsTP16_1").className = "mbline";
			}
		}
	}
}

function ShowNumberOdds_Q(isSpecial){
	objLFrame = (document.all)?document.frames.leftFrame:document.getElementById("leftFrameID").contentWindow;
	with(objLFrame){
		document.CommonWagerForm.CheckKey1.value = strCheckKey1;
		document.CommonWagerForm.CheckKey2.value = strCheckKey2;
		GetWagerTable();
	}
}

function ShowNumberOdds_O(isSpecial){
	var i = 1, arrTmpGame = new Array(), intBID = 1, arrOEGame = new Array(), arrOUGame = new Array(), arrSOEGame = new Array();
	objMFrame = (document.all)?document.frames.mainFrame:document.getElementById("mainFrameID").contentWindow;
	with(objMFrame){
		//document.all.Marquees.innerHTML = strMarquee;
		if(isSpecial == 1 || isSpecial == 28){
			//arrTmpGame = Game1;
			intBID = isSpecial;
			arrOEGame = Game2;
			arrOUGame = Game3;
			arrSOEGame = Game16;
		}else if(isSpecial == 4){
			//arrTmpGame = Game4;
			intBID = 4;
			arrOEGame = Game5;
			arrOUGame = Game6;
		}else{
			intBID = isSpecial;
		}
		
		GetWagerTable();
		/*for(i = 1; i < arrTmpGame.length; i++){
			document.getElementById("OddsTip1_" + i).innerHTML = arrTmpGame[i][5];
			document.getElementById("OddsTip1_" + i).href = "wager_common.php?UserID="+strUserID+"&GambleID="+arrTmpGame[i][1]+"&Bet_Type="+arrTmpGame[i][2]+"&OddsID="+arrTmpGame[i][4]+"&Odds="+arrTmpGame[i][5]+"&LottoID="+arrTmpGame[i][0]+"&Number="+i;
		}*/

		//document.getElementById("GameTime").innerHTML = strGameTime;
		document.getElementById("GameNo").innerHTML = strGameNo;
		document.getElementById("ChinaTime").innerHTML = strChinaTime;
		if(isSpecial > 20 && isSpecial < 27)return;
		//單雙
		document.getElementById("OddsTip2_0").innerHTML = Math.round((1 + parseFloat(arrOEGame[0][5]))*1000)/1000;
		document.getElementById("OddsTip2_0").href = "wager_common.php?UserID="+strUserID+"&GambleID="+arrOEGame[0][1]+"&Bet_Type="+arrOEGame[0][2]+"&OddsID="+arrOEGame[0][4]+"&Odds="+arrOEGame[0][5]+"&LottoID="+arrOEGame[0][0]+"&Number=0&sid="+sid;
		document.getElementById("OddsTip2_1").innerHTML = Math.round((1 + parseFloat(arrOEGame[1][5]))*1000)/1000;
		document.getElementById("OddsTip2_1").href = "wager_common.php?UserID="+strUserID+"&GambleID="+arrOEGame[1][1]+"&Bet_Type="+arrOEGame[1][2]+"&OddsID="+arrOEGame[1][4]+"&Odds="+arrOEGame[1][5]+"&LottoID="+arrOEGame[1][0]+"&Number=1&sid="+sid;
		if(arrOEGame[0][6] == "1"){
			document.getElementById("OddsTD2_0").className = "mbline_baratio_stop";
			document.getElementById("OddsTD2_1").className = "mbline_baratio_stop";
		}else{
			document.getElementById("OddsTD2_0").className = "mbline_baratio";
			document.getElementById("OddsTD2_1").className = "mbline_baratio";
		}
		//大小
		document.getElementById("OddsTip3_0").innerHTML = Math.round((1 + parseFloat(arrOUGame[0][5]))*1000)/1000;
		document.getElementById("OddsTip3_0").href = "wager_common.php?UserID="+strUserID+"&GambleID="+arrOUGame[0][1]+"&Bet_Type="+arrOUGame[0][2]+"&OddsID="+arrOUGame[0][4]+"&Odds="+arrOUGame[0][5]+"&LottoID="+arrOUGame[0][0]+"&Number=0&sid="+sid;
		document.getElementById("OddsTip3_1").innerHTML = Math.round((1 + parseFloat(arrOUGame[1][5]))*1000)/1000;
		document.getElementById("OddsTip3_1").href = "wager_common.php?UserID="+strUserID+"&GambleID="+arrOUGame[1][1]+"&Bet_Type="+arrOUGame[1][2]+"&OddsID="+arrOUGame[1][4]+"&Odds="+arrOUGame[1][5]+"&LottoID="+arrOUGame[1][0]+"&Number=1&sid="+sid;
		if(arrOUGame[0][6] == "1"){
			document.getElementById("OddsTD3_0").className = "mbline_baratio_stop";
			document.getElementById("OddsTD3_1").className = "mbline_baratio_stop";
		}else{
			document.getElementById("OddsTD3_0").className = "mbline_baratio";
			document.getElementById("OddsTD3_1").className = "mbline_baratio";
		}
		if(isSpecial == 1 || isSpecial == 28){
			//合數單雙
			document.getElementById("OddsTip16_0").innerHTML = Math.round((1 + parseFloat(arrSOEGame[0][5]))*1000)/1000;
			document.getElementById("OddsTip16_0").href = "wager_common.php?UserID="+strUserID+"&GambleID="+arrSOEGame[0][1]+"&Bet_Type="+arrSOEGame[0][2]+"&OddsID="+arrSOEGame[0][4]+"&Odds="+arrSOEGame[0][5]+"&LottoID="+arrSOEGame[0][0]+"&Number=0&sid="+sid;
			document.getElementById("OddsTip16_1").innerHTML = Math.round((1 + parseFloat(arrSOEGame[1][5]))*1000)/1000;
			document.getElementById("OddsTip16_1").href = "wager_common.php?UserID="+strUserID+"&GambleID="+arrSOEGame[1][1]+"&Bet_Type="+arrSOEGame[1][2]+"&OddsID="+arrSOEGame[1][4]+"&Odds="+arrSOEGame[1][5]+"&LottoID="+arrSOEGame[1][0]+"&Number=1&sid="+sid;
			if(arrSOEGame[0][6] == "1"){
				document.getElementById("OddsTD16_0").className = "mbline_baratio_stop";
				document.getElementById("OddsTD16_1").className = "mbline_baratio_stop";
			}else{
				document.getElementById("OddsTD16_0").className = "mbline_baratio";
				document.getElementById("OddsTD16_1").className = "mbline_baratio";
			}
		}
	}
}


function ShowNumber51_C(){
	if(sType == "o")return ShowNumber51_O();
	objMFrame = (document.all)?document.frames.mainFrame:document.getElementById("mainFrameID").contentWindow;
	with(objMFrame){
		intUseCredit = UseCredit;
		arrChildEveLimitUsed = arrEveLimitUsed;
		document.CommonWagerForm.CheckKey1.value = strCheckKey1;
		document.CommonWagerForm.CheckKey2.value = strCheckKey2;
		document.CommonWagerForm.UserID.value = strUserID;
		GetWagerTable();

		//document.CommonWagerForm.GambleID.value = arrTmpGame[1][1];
		//document.CommonWagerForm.LottoID.value = arrTmpGame[1][0];
		document.getElementById("GameNo").innerHTML = strGameNo;
		document.getElementById("ChinaTime").innerHTML = strChinaTime;
	}
}

function ShowNumber51_O(isSpecial){
	objMFrame = (document.all)?document.frames.mainFrame:document.getElementById("mainFrameID").contentWindow;
	with(objMFrame){
		document.getElementById("GameNo").innerHTML = strGameNo;
		document.getElementById("ChinaTime").innerHTML = strChinaTime;
		InsertOdds();
	}
}

function ShowNumber64_C(){
	if(sType == "o")return ShowNumber64_O();
	objMFrame = (document.all)?document.frames.mainFrame:document.getElementById("mainFrameID").contentWindow;
	with(objMFrame){
		intUseCredit = UseCredit;
		arrChildEveLimitUsed = arrEveLimitUsed;
		document.CommonWagerForm.CheckKey1.value = strCheckKey1;
		document.CommonWagerForm.CheckKey2.value = strCheckKey2;
		document.CommonWagerForm.UserID.value = strUserID;
		GetWagerTable();

		document.getElementById("GameNo").innerHTML = strGameNo;
		document.getElementById("ChinaTime").innerHTML = strChinaTime;
	}
}

function ShowNumber64_O(){
	objMFrame = (document.all)?document.frames.mainFrame:document.getElementById("mainFrameID").contentWindow;
	with(objMFrame){
		document.getElementById("GameNo").innerHTML = strGameNo;
		document.getElementById("ChinaTime").innerHTML = strChinaTime;
		GetWagerTable();
	}
}

function ShowNumber92_C(){
	if(sType == "o")return ShowNumber92_O();
	objMFrame = (document.all)?document.frames.mainFrame:document.getElementById("mainFrameID").contentWindow;
	with(objMFrame){
		intUseCredit = UseCredit;
		arrChildEveLimitUsed = arrEveLimitUsed;
		document.CommonWagerForm.CheckKey1.value = strCheckKey1;
		document.CommonWagerForm.CheckKey2.value = strCheckKey2;
		document.CommonWagerForm.UserID.value = strUserID;
		GetWagerTable();

		document.getElementById("GameNo").innerHTML = strGameNo;
		document.getElementById("ChinaTime").innerHTML = strChinaTime;
	}
}

function ShowNumber92_O(){
	objMFrame = (document.all)?document.frames.mainFrame:document.getElementById("mainFrameID").contentWindow;
	with(objMFrame){
		document.getElementById("GameNo").innerHTML = strGameNo;
		document.getElementById("ChinaTime").innerHTML = strChinaTime;
		GetWagerTable();
	}
}


function Show7Star18_C(){
	if(sType == "o")return Show7Star18_O();
	objMFrame = (document.all)?document.frames.mainFrame:document.getElementById("mainFrameID").contentWindow;
	with(objMFrame){
		intUseCredit = UseCredit;
		arrChildEveLimitUsed = arrEveLimitUsed;
		document.CommonWagerForm.CheckKey1.value = strCheckKey1;
		document.CommonWagerForm.CheckKey2.value = strCheckKey2;
		document.CommonWagerForm.UserID.value = strUserID;
		GetWagerTable();

		//document.CommonWagerForm.GambleID.value = arrTmpGame[1][1];
		//document.CommonWagerForm.LottoID.value = arrTmpGame[1][0];
		document.getElementById("GameNo").innerHTML = strGameNo;
		document.getElementById("ChinaTime").innerHTML = strChinaTime;
	}
}

function Show7Star18_O(isSpecial){
	objMFrame = (document.all)?document.frames.mainFrame:document.getElementById("mainFrameID").contentWindow;
	with(objMFrame){
		document.getElementById("GameNo").innerHTML = strGameNo;
		document.getElementById("ChinaTime").innerHTML = strChinaTime;
		InsertOdds();
	}
}

function Show7Star1_C(){
	if(sType == "o")return Show7Star1_O();
	objMFrame = (document.all)?document.frames.mainFrame:document.getElementById("mainFrameID").contentWindow;
	with(objMFrame){
		intUseCredit = UseCredit;
		arrChildEveLimitUsed = arrEveLimitUsed;
		document.CommonWagerForm.CheckKey1.value = strCheckKey1;
		document.CommonWagerForm.CheckKey2.value = strCheckKey2;
		document.CommonWagerForm.UserID.value = strUserID;
		GetWagerTable();

		document.getElementById("GameNo").innerHTML = strGameNo;
		document.getElementById("ChinaTime").innerHTML = strChinaTime;
	}
}

function Show7Star1_O(){
	objMFrame = (document.all)?document.frames.mainFrame:document.getElementById("mainFrameID").contentWindow;
	with(objMFrame){
		document.getElementById("GameNo").innerHTML = strGameNo;
		document.getElementById("ChinaTime").innerHTML = strChinaTime;
		GetWagerTable();
	}
}


function Show10MNOdds_C(isSpecial){
	switch(sType){
		case "o":
			return Show10MNOdds_O(isSpecial);
			break;
		case "q":
			return Show10MNOdds_Q(isSpecial);
			break;
	}
	var i = 1, arrTmpGame = new Array(), arrOEGame = new Array(), arrOUGame = new Array(), arrSOEGame = new Array();
	arrTmpGame = eval("Game" + isSpecial);
	objMFrame = (document.all)?document.frames.mainFrame:document.getElementById("mainFrameID").contentWindow;
	with(objMFrame){
		//document.all.Marquees.innerHTML = strMarquee;
		intUseCredit = UseCredit;
		arrChildEveLimitUsed = arrEveLimitUsed;
		document.CommonWagerForm.CheckKey1.value = strCheckKey1;
		document.CommonWagerForm.CheckKey2.value = strCheckKey2;
		document.CommonWagerForm.UserID.value = strUserID;
		if(isSpecial == 1){
			arrOEGame = Game2;
			arrOUGame = Game3;
			arrSOEGame = Game4;
		}
		GetWagerTable();
		document.CommonWagerForm.GambleID.value = arrTmpGame[1][1];
		document.CommonWagerForm.LottoID.value = arrTmpGame[1][0];
		document.getElementById("GameNo").innerHTML = strGameNo;
		document.getElementById("ChinaTime").innerHTML = strChinaTime;
		if(isSpecial >= 5 && isSpecial <= 8)return;
		//單雙
		document.getElementById("OddsTD2_0").innerHTML = Math.round((1 + parseFloat(arrOEGame[0][5]))*1000)/1000;
		document.getElementById("OddsTD2_1").innerHTML = Math.round((1 + parseFloat(arrOEGame[1][5]))*1000)/1000;
		if(arrOEGame[0][6] == "1"){
			document.ShowOddsForm["Odds2_0"].disabled = true;
			document.ShowOddsForm["Odds2_1"].disabled = true;
			document.getElementById("OddsTD2_0").className = "mbline_ratio_stop";
			document.getElementById("OddsTP2_0").className = "mbline_stop";
			document.getElementById("OddsTD2_1").className = "mbline_ratio_stop";
			document.getElementById("OddsTP2_1").className = "mbline_stop";
		}else{
			document.ShowOddsForm["Odds2_0"].disabled = false;
			document.ShowOddsForm["Odds2_1"].disabled = false;
			document.getElementById("OddsTD2_0").className = "mbline_ratio";
			document.getElementById("OddsTP2_0").className = "mbline";
			document.getElementById("OddsTD2_1").className = "mbline_ratio";
			document.getElementById("OddsTP2_1").className = "mbline";
		}
		//大小
		//document.ShowOddsForm["Odds3_0"].value = "";
		//document.ShowOddsForm["Odds3_1"].value = "";
		document.getElementById("OddsTD3_0").innerHTML = Math.round((1 + parseFloat(arrOUGame[0][5]))*1000)/1000;
		document.getElementById("OddsTD3_1").innerHTML = Math.round((1 + parseFloat(arrOUGame[1][5]))*1000)/1000;
		if(arrOUGame[0][6] == "1"){
			document.ShowOddsForm["Odds3_0"].disabled = true;
			document.ShowOddsForm["Odds3_1"].disabled = true;
			document.getElementById("OddsTD3_0").className = "mbline_ratio_stop";
			document.getElementById("OddsTP3_0").className = "mbline_stop";
			document.getElementById("OddsTD3_1").className = "mbline_ratio_stop";
			document.getElementById("OddsTP3_1").className = "mbline_stop";
		}else{
			document.ShowOddsForm["Odds3_0"].disabled = false;
			document.ShowOddsForm["Odds3_1"].disabled = false;
			document.getElementById("OddsTD3_0").className = "mbline_ratio";
			document.getElementById("OddsTP3_0").className = "mbline";
			document.getElementById("OddsTD3_1").className = "mbline_ratio";
			document.getElementById("OddsTP3_1").className = "mbline";
		}
		if(isSpecial == 1){
			//合數單雙
			document.getElementById("OddsTD4_0").innerHTML = Math.round((1 + parseFloat(arrSOEGame[0][5]))*1000)/1000;
			document.getElementById("OddsTD4_1").innerHTML = Math.round((1 + parseFloat(arrSOEGame[1][5]))*1000)/1000;
			if(arrSOEGame[0][6] == "1"){
				document.ShowOddsForm["Odds4_0"].disabled = true;
				document.ShowOddsForm["Odds4_1"].disabled = true;
				document.getElementById("OddsTD4_0").className = "mbline_ratio_stop";
				document.getElementById("OddsTP4_0").className = "mbline_stop";
				document.getElementById("OddsTD4_1").className = "mbline_ratio_stop";
				document.getElementById("OddsTP4_1").className = "mbline_stop";
			}else{
				document.ShowOddsForm["Odds4_0"].disabled = false;
				document.ShowOddsForm["Odds4_1"].disabled = false;
				document.getElementById("OddsTD4_0").className = "mbline_ratio";
				document.getElementById("OddsTP4_0").className = "mbline";
				document.getElementById("OddsTD4_1").className = "mbline_ratio";
				document.getElementById("OddsTP4_1").className = "mbline";
			}
		}
	}
}

function Show10MNOdds_Q(isSpecial){
	objLFrame = (document.all)?document.frames.leftFrame:document.getElementById("leftFrameID").contentWindow;
	with(objLFrame){
		document.CommonWagerForm.CheckKey1.value = strCheckKey1;
		document.CommonWagerForm.CheckKey2.value = strCheckKey2;
		GetWagerTable();
	}
}

function Show10MNOdds_O(intBT){
	var i = 1, arrTmpGame = new Array(), arrOEGame = new Array(), arrOUGame = new Array(), arrSOEGame = new Array();
	objMFrame = (document.all)?document.frames.mainFrame:document.getElementById("mainFrameID").contentWindow;
	with(objMFrame){
		if(intBT == 1){
			arrOEGame = Game2;
			arrOUGame = Game3;
			arrSOEGame = Game4;
		}		
		GetWagerTable();

		//document.getElementById("GameTime").innerHTML = strGameTime;
		document.getElementById("GameNo").innerHTML = strGameNo;
		document.getElementById("ChinaTime").innerHTML = strChinaTime;
		if(intBT >= 5 && intBT <= 8)return;
		//單雙
		document.getElementById("OddsTip2_0").innerHTML = Math.round((1 + parseFloat(arrOEGame[0][5]))*1000)/1000;
		document.getElementById("OddsTip2_0").href = "wager_common.php?UserID="+strUserID+"&GambleID="+arrOEGame[0][1]+"&Bet_Type="+arrOEGame[0][2]+"&OddsID="+arrOEGame[0][4]+"&Odds="+arrOEGame[0][5]+"&LottoID="+arrOEGame[0][0]+"&Number=0&sid="+sid;
		document.getElementById("OddsTip2_1").innerHTML = Math.round((1 + parseFloat(arrOEGame[1][5]))*1000)/1000;
		document.getElementById("OddsTip2_1").href = "wager_common.php?UserID="+strUserID+"&GambleID="+arrOEGame[1][1]+"&Bet_Type="+arrOEGame[1][2]+"&OddsID="+arrOEGame[1][4]+"&Odds="+arrOEGame[1][5]+"&LottoID="+arrOEGame[1][0]+"&Number=1&sid="+sid;
		if(arrOEGame[0][6] == "1"){
			document.getElementById("OddsTD2_0").className = "mbline_baratio_stop";
			document.getElementById("OddsTD2_1").className = "mbline_baratio_stop";
		}else{
			document.getElementById("OddsTD2_0").className = "mbline_baratio";
			document.getElementById("OddsTD2_1").className = "mbline_baratio";
		}
		//大小
		document.getElementById("OddsTip3_0").innerHTML = Math.round((1 + parseFloat(arrOUGame[0][5]))*1000)/1000;
		document.getElementById("OddsTip3_0").href = "wager_common.php?UserID="+strUserID+"&GambleID="+arrOUGame[0][1]+"&Bet_Type="+arrOUGame[0][2]+"&OddsID="+arrOUGame[0][4]+"&Odds="+arrOUGame[0][5]+"&LottoID="+arrOUGame[0][0]+"&Number=0&sid="+sid;
		document.getElementById("OddsTip3_1").innerHTML = Math.round((1 + parseFloat(arrOUGame[1][5]))*1000)/1000;
		document.getElementById("OddsTip3_1").href = "wager_common.php?UserID="+strUserID+"&GambleID="+arrOUGame[1][1]+"&Bet_Type="+arrOUGame[1][2]+"&OddsID="+arrOUGame[1][4]+"&Odds="+arrOUGame[1][5]+"&LottoID="+arrOUGame[1][0]+"&Number=1&sid="+sid;
		if(arrOUGame[0][6] == "1"){
			document.getElementById("OddsTD3_0").className = "mbline_baratio_stop";
			document.getElementById("OddsTD3_1").className = "mbline_baratio_stop";
		}else{
			document.getElementById("OddsTD3_0").className = "mbline_baratio";
			document.getElementById("OddsTD3_1").className = "mbline_baratio";
		}
		if(intBT == 1){
			//合數單雙
			document.getElementById("OddsTip4_0").innerHTML = Math.round((1 + parseFloat(arrSOEGame[0][5]))*1000)/1000;
			document.getElementById("OddsTip4_0").href = "wager_common.php?UserID="+strUserID+"&GambleID="+arrSOEGame[0][1]+"&Bet_Type="+arrSOEGame[0][2]+"&OddsID="+arrSOEGame[0][4]+"&Odds="+arrSOEGame[0][5]+"&LottoID="+arrSOEGame[0][0]+"&Number=0&sid="+sid;
			document.getElementById("OddsTip4_1").innerHTML = Math.round((1 + parseFloat(arrSOEGame[1][5]))*1000)/1000;
			document.getElementById("OddsTip4_1").href = "wager_common.php?UserID="+strUserID+"&GambleID="+arrSOEGame[1][1]+"&Bet_Type="+arrSOEGame[1][2]+"&OddsID="+arrSOEGame[1][4]+"&Odds="+arrSOEGame[1][5]+"&LottoID="+arrSOEGame[1][0]+"&Number=1&sid="+sid;
			if(arrSOEGame[0][6] == "1"){
				document.getElementById("OddsTD4_0").className = "mbline_baratio_stop";
				document.getElementById("OddsTD4_1").className = "mbline_baratio_stop";
			}else{
				document.getElementById("OddsTD4_0").className = "mbline_baratio";
				document.getElementById("OddsTD4_1").className = "mbline_baratio";
			}
		}
	}
}


function RefreshLeftFrame(){
	objLFrame = (document.all)?document.frames.leftFrame:document.getElementById("leftFrameID").contentWindow;
	objTFrame = (document.all)?document.frames.topFrame:document.getElementById("topFrameID").contentWindow;
	if(objLFrame.strDate == null || objLFrame.strDate == undefined){
		objTFrame.document.LeftForm.submit();
	}
}

onunload = function(){
	//window.open("logout.php?isOff=1&sid="+sid,"clearWindow","toolbar=no,width=100,height=100,directories=no,status=no,scrollbars=no,menubar=no,top=1,left=1");
}
